Interactive geographic maps, e.g., maps provided by a web map service, can provide a visual representation of a geographic region. An interactive geographic map for a particular geographic region can also describe various features that appear in the particular geographic region. For example, an interactive geographic map can describe line features, e.g., roads and rivers, area features, e.g., countries, parcels, forests, and lakes, and point features, e.g., villages and cities. Each feature in an interactive geographic map can be labeled, e.g., annotated, by positioning, near the feature and in the interactive geographic map, one or more labels, e.g., map labels, that describe the feature. For example, an interactive geographic map that includes a point feature referencing the city of San Francisco can be labeled by placing a label “San Francisco” near the point feature.
Computerized methods can be used to automatically position respective labels near features in an interactive geographic map. Such computerized methods can be configured to label features in an interactive geographic map based on predefined rules, e.g., repeat labels for roads or place labels for point features in a position that is located northwest direction of the point features. These computerized methods can also apply various algorithms, e.g., simulated annealing, genetic algorithms, etc., to optimize the placement of labels for features in an interactive geographic map. For example, various algorithms can be applied to position labels in an interactive geographic map in a manner that avoids overlap with other labels.
Computerized labeling of curved line features, e.g., curved road labels, can create special challenges. For example, positioning a label for a curved line feature is generally done by positioning the characters in the label along a boundary of the curved line feature. In such instances, characters positioned incorrectly can overlap and, as a result, make the label difficult to read in a geographic map. It is difficult to predetermine character overlap for a curved line feature label since most interactive mapping applications allow for maps to be viewed at different zoom levels. That is, characters may need to be repositioned as a user zooms in and out of an interactive geographic map and can therefore make it difficult to predetermine whether characters in a label will overlap.